package com.md.youyouhui.net.repo;

import android.arch.lifecycle.LiveData;

import com.md.youyouhui.common.Resource;
import com.md.youyouhui.net.ApiServiceFac;
import com.md.youyouhui.net.response.QuestionResponse;
import com.md.youyouhui.utils.calladapter.ResourceConvertUtils;

/**
 * Created by AdministratorZJ
 * on 2018/5/25.
 */

public class QuestionRepo {
    private static QuestionRepo INSTANCE;

    public static QuestionRepo newInstance() {
        if (null == INSTANCE) {
            INSTANCE = new QuestionRepo();
        }
        return INSTANCE;
    }


    public LiveData<Resource<QuestionResponse>> question(int pageNum, int pageSise) {

        return ResourceConvertUtils.convertResource(ApiServiceFac.get().question(pageNum, pageSise));
    }


}
